<%@ page import="com.pijunn.label.Label" %>



<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'serialNumber', 'error')} required">
	<label for="serialNumber">
		<g:message code="label.serialNumber.label" default="Serial Number" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="serialNumber" type="number" value="${labelInstance.serialNumber}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'registrationDate', 'error')} ">
	<label for="registrationDate">
		<g:message code="label.registrationDate.label" default="Registration Date" />
		
	</label>
	<g:datePicker name="registrationDate" precision="day"  value="${labelInstance?.registrationDate}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'creationDate', 'error')} required">
	<label for="creationDate">
		<g:message code="label.creationDate.label" default="Creation Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="creationDate" precision="day"  value="${labelInstance?.creationDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'createdByUserName', 'error')} required">
	<label for="createdByUserName">
		<g:message code="label.createdByUserName.label" default="Created By User Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="createdByUserName" required="" value="${labelInstance?.createdByUserName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'item', 'error')} required">
	<label for="item">
		<g:message code="label.item.label" default="Item" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="item" name="item.id" from="${com.pijunn.label.LabeledItem.list()}" optionKey="id" required="" value="${labelInstance?.item?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'registeredTo', 'error')} required">
	<label for="registeredTo">
		<g:message code="label.registeredTo.label" default="Registered To" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="registeredTo" name="registeredTo.id" from="${com.pijunn.users.AppUser.list()}" optionKey="id" required="" value="${labelInstance?.registeredTo?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: labelInstance, field: 'type', 'error')} required">
	<label for="type">
		<g:message code="label.type.label" default="Type" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="type" from="${com.pijunn.common.enums.LabelType?.values()}" keys="${com.pijunn.common.enums.LabelType.values()*.name()}" required="" value="${labelInstance?.type?.name()}"/>
</div>

